<template>
    <div>
        <h2>增加会员信息</h2>
        <table class="table table-bordered">
            <tr>
                <td>会员名称</td>
                <td>
                    {{ state.memberInfoName }}
                </td>
            </tr>
            <tr>
                <td>会员手机号</td>
                <td>{{ state.memberInfoPhone }}</td>
            </tr>
            <tr>
                <td>会员性别</td>
                <td>
                    {{ state.memberInfoSex }}
                </td>
            </tr>
            <tr>
                <td>会员图片</td>
                <td>
                    <img :src="'https://localhost:7088'+state.memberPhoto" alt="" style="width:70px;height:70px;">
                </td>
            </tr>
            <tr>
                <td>备注</td>
                <td>
                    {{ state.inter }}
                </td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios  from 'axios';
import { reactive,toRefs,onMounted } from 'vue';
import { useRouter,useRoute } from 'vue-router';
const router = useRouter();
const route = useRoute();
const data = reactive({
    state:{
  "memberInfoName": "",
  "memberInfoPhone": "",
  "memberInfoSex": "",
  "memberPhoto": "",
  "createDate": "2024-09-09T02:55:55.724Z",
  "updateDate": "2024-09-09T02:55:55.724Z",
  "intergral": 0,
  "money": 0,
  "inter": "",
  "state": 0,
  "isDeleted": false
    }
})

const {state} = toRefs(data);

onMounted(()=>{
    fantian();
    xiangqingye();
})

const fantian = ()=>{
    axios({
        url:'/api/Member/FantianId',
        method:'get',
        params:{
            id:route.query.id
        }
    })
    .then(res => {
        console.log(res);
        state.value= res.data.data;
    })
    .catch(err => {
        console.log(err);
    })
}






//详情显示
const xiangqingye = () => {
    axios({
        url:'/api/Member/Show',
        method:'get',
        params:state.value
    })
    .then(res => {
        console.log(res);
        state.value=res.data;
    })
    .catch(err => {
        console.log(err);
    })
}

</script>

<style scoped>

</style>